{template 'common/header'}
<div class="main">
	<ul class="nav nav-tabs">
		<li class="active"><a href="{php echo $this->createWebUrl('list');}">调研列表</a></li>
		<li><a href="{php echo url('platform/reply/post', array('m'=>'fwei_survey'));}">添加调研</a></li>
	</ul>

	<div class="panel panel-info">
		<div class="panel-heading">筛选</div>
		<div class="panel-body">
			<form action="./index.php" method="post" class="form-horizontal" role="form">
			<input type="hidden" name="c" value="site">
			<input type="hidden" name="a" value="entry">
			<input type="hidden" name="do" value="list">
			<input type="hidden" name="m" value="fwei_survey" />
			<div class="form-group">
				<label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label">标题</label>
				<div class="col-sm-4">
					<input class="form-control" name="title" id="" type="text" value="{$_GPC['title']}">
				</div>				
			</div>
			<div class="form_group">
				<input name="token" type="hidden" value="{$_W['token']}" />
				<input type="submit" class="btn btn-primary" name="submit" value="提交" />
			</div>
			</form>
		</div>
	</div>

	<div class="panel panel-default">
		<div class="panel-heading">
			调研问题列表
		</div>
		<div class="panel-body">
			<table class="table table-hover">
				<thead class="navbar-inner">
					<tr>
						<th style="width:60px;">ID</th>						
	                    <th>标题</th>
						<th style="width:170px; text-align:center;">开始时间</th>
						<th style="width:170px; text-align:center;">结束时间</th>
						<th style="width:80px;">参与人数</th>
						<th style="text-align:center;">操作</th>
					</tr>
				</thead>
				<tbody>
					{loop $list $row}
						<tr>			
							<td class="row-first">{$row['sid']}</td>
	                        <td>{$row['title']}</td>
							<td align="center">{php echo date('Y-m-d H:i:s',$row['stime'])}</td>
							<td align="center">{php echo date('Y-m-d H:i:s',$row['etime'])}</td>
							<td><span style="height:16px;line-height:16px" class="label label-success">共 {$row['num']} 人</span></td>
							<td align="center">
								<a href="{php echo url('platform/reply/post', array('m'=>'fwei_survey','rid'=>$row['rid']));}" >编辑</a> | 
								<a href="{php echo $this->createWebUrl('question', array('id'=>$row['rid']));}" >问题管理</a> | 
								<a href="{php echo $this->createWebUrl('answer', array('id'=>$row['rid']));}" >调研报告</a> | 
	                        	<a href="{php echo url('platform/reply/delete', array('m'=>'fwei_survey','rid'=>$row['rid']));}" onclick="return confirm('此操作将同时删除收集的调研报告,确定要删除吗?')" >删除</a>
	                        </td>
						</tr>
					{/loop}
				</tbody>
			</table>
			{$pager}
		</div>
	</div>
</div>
{template 'common/footer'}
